#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>

int main() {
	int f1,f2;
	int *buff = malloc(1024 * sizeof(int));
//	int *buff = 0xC0080000;
	f1 = open ("/dev/seq1",O_CREAT);
	int num = 3*1026;
	int i;
	for (i = 0 ; i < 1024; i++) {
//		buff[i] = 0;
	}
	int ret = read(f1,buff,num); // printks 1
	printf("ret = %d errno! %d\n",ret,errno);
	for (i = 0; i < num; i++) {
		printf("buff[%d]: %d\n",i,buff[i]);
	}
	exit(0);
	read(f1,buff,5); // printks 2
	f2 = open("/dev/seq1",O_CREAT);	 
	read(f2,buff,5); // printks 1
	read(f1,buff,5); // printks 3
	printf("ret = %d, errno: %d\n",f1,errno);
	
	close(f1);
	close(f2);
	
}